#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
typedef long long LL;
int x[N];
int y[N];
int he[N], cha[N];
int sum
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x[i] >> y[i];
    he[i] = x[i] - y[i];
    cha[i] = x[i] - y[i];
  }
  sort(point + 1, point + n + 1, guize1);
  int xmiddle;
  if (n % 2 == 0)
    xmiddle = (point[n / 2].x + point[n / 2 + 1].x) / 2;
  else
    xmiddle = point[n / 2 + 1].x;

  sort(point + 1, point + n + 1, guize2);
  int ymiddle;
  if (n % 2 == 0)
    ymiddle = (point[n / 2].y + point[n / 2 + 1].y) / 2;
  else
    ymiddle = point[n / 2 + 1].y;

  // n无论奇数偶数，中位数：左边 n/2个，右边n/2个
  Point midd = Point{xmiddle, ymiddle};

  for (int i = 1; i <= n; i++) {
    point[i].deltaY = n * abs(point[i].y - midd.y); // 距离 中位数的差值。
  }

  sort(point + 1, point + n + 1, guize1);
  for (int i = 1; i <= n; i++) {
    // 这里错了！！ 遇到挫折
    point[i].deltaX = n / 2 * (point[i].x - midd.x) -
                      n / 2 * (point[i].x - midd.x); // 距离 中位数的差值。
  }

  int ans = INT_MAX;
  int p;
  for (int i = 1; i <= n; i++) {
    int t = point[i].deltaX + point[i].deltaY;
    if (t < ans) {
      ans = t;
      p = i;
    }
  }
  LL len = 0;
  for (int i = 1; i <= n; i++) {
    len += abs(point[i].x - point[p].x) + abs(point[i].y - point[p].y);
  }
  cout << len;

  return 0;
}